package com._51doit.day02;

/**
 * @create: 2021-10-08 21:42
 * @author: 今晚打脑斧
 * @program: MyListDemo
 * @Description:
 **/
public class MyListDemo {
    public static void main(String[] args) {
        MyList<Double> list = new MyList<>();
        list.add(1.0);
        list.add(2.0);
        list.add(3.0);
        list.add(4.0);
        list.add(5.0);
        System.out.println(list.map(i -> i * 10));
        System.out.println(list.filter(i -> i > 2.0));
        System.out.println(list.reduce((a, b) -> a + b));
    }
}
